
<div class="col-lg-12" id="container-button-save">
    <div id="main_button" class="btn btn-danger">Lưu Dữ Liệu</div>
    <h1 class="page-header">Danh mục sản phẩm</h1>
    
</div>
<br/>

<div class="col-lg-12">
    

    <ul id="myTab" class="nav nav-tabs">
        <li class="active"><a href="#home" class="h_item_tab" >Thông tin chung</a></li>
        <li class=""><a href="#seo" class="h_item_tab" >SEO</a></li>
        <li class=""><a href="#profile" class="h_item_tab" >Banner</a></li>

    </ul>
    <div id="myTabContent" class="tab-content h_tab_content well">
        <?php
        $form = $this->beginWidget('booster.widgets.TbActiveForm', array('htmlOptions' => array('id' => 'h_main_form', 'enctype' => 'multipart/form-data')));
        ?>
        <div class="tab-pane active" id="home">
            <p>

                <?php
                echo $form->textFieldGroup($model, 'name');
                echo $form->dropDownListGroup(
                        $model, 'parents', array(
                    'widgetOptions' => array(
                        'data' => $listTaxonomy,
                    )
                        )
                );
                echo $form->textFieldGroup($model, 'orders');
                echo $form->fileFieldGroup($model, 'image');
                ?>
                <?php
                if ($model->getImage() !== false) {
                    echo "<img src='" . urlImageFolder('taxonomy') . $model->getImage() . "' height='100' />";
                }
                ?>
                <?php
                echo $form->textAreaGroup(
                        $model, 'description', array(
                            'widgetOptions' => array(
                                'htmlOptions' => array('rows' => 5),
                            )
                        )
                );
                ?>
                
            </p>
        </div>
        <div class="tab-pane h_hide" id="seo">
            <p>
                <?php
                    echo $form->textFieldGroup($model, 'seo_title');
                    echo $form->textFieldGroup($model, 'seo_keywork');
                    echo $form->textFieldGroup($model, 'seo_description');
                ?>
            </p>
        </div>
        <?php
        $this->endWidget();
        unset($form);
        ?>
        <div class="tab-pane h_hide" id="profile">
            <p>
                <?php
                if (isset($model->id) && $model->id)
                    $this->widget('BannerWidget', array('type' => BANNER_TAXONOMY, 'object' => $model->id));
                else
                    echo "<div class='alert'>Bạn phải lưu danh mục trước khi thêm banner</div>";
                ?>   
            </p>
        </div>

    </div>


</div>
<script>
    
</script>